package com.generation.builder;

import com.generation.Bean.Constants;
import com.generation.utils.DateUtils;
import com.sun.org.glassfish.gmbal.Description;

import java.io.BufferedWriter;

/**
 * @author mockingjay
 * @date 2023/4/6 - 12:23
 */
public class BuildComment {
    //生成类注释
    public static void createClassComment(BufferedWriter bw,String classComment)throws Exception{
        bw.write("/**");
        bw.newLine();
        bw.write(" * @Description: "+classComment);
        bw.newLine();
        bw.write(" * @author: "+ Constants.AUTHOR);
        bw.newLine();
        bw.write(" * @date: "+ DateUtils.getNowDate());
        bw.newLine();
        bw.write(" */");
        bw.newLine();
    }
    //生成属性注释
    public static void createFieldComment(BufferedWriter bw,String fieldComment)throws Exception{
        bw.write("\t/**");
        bw.newLine();
        bw.write("\t * @Description: "+fieldComment);
        bw.newLine();
        bw.write("\t */");
        bw.newLine();
    }
    //生成方法注释
    public static void createMethodComment(BufferedWriter bw){

    }
}
